#pragma once

namespace cm {
namespace Windows {

class CComboBoxAutoComplete : public CWindowImpl<CComboBoxAutoComplete, CComboBox>,
								public CMessageFilter
{
public:
	CComboBoxAutoComplete(UINT NotificationMsg) 
		: m_bAutoComplete(true),m_NotificationMsg(NotificationMsg)
	{
	}
private:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
private:
	LRESULT OnEditUpdate(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL bHandled);
private:
	BEGIN_MSG_MAP(CComboBoxAutoComplete)
		REFLECTED_COMMAND_CODE_HANDLER(CBN_EDITUPDATE,OnEditUpdate)
		DEFAULT_REFLECTION_HANDLER()
	END_MSG_MAP()
private:
	bool m_bAutoComplete;
	UINT m_NotificationMsg;
};

}}